const path = require('path');

module.exports = {
    context: path.resolve(__dirname, "src", "js"),
    entry: {
        index: 'index.js'
    },
    output: {
        path: path.resolve(__dirname, "assets", "es6"),
        filename: "[name].js?v=[chunkhash:7]"
    },
    modules: {
        rules: [
            {
                test: /\.js$/,
                use: ['babel-loader']
            }
        ]
    },
    devtool: 'source-map',
    devServer: {
        contentBase: path.resolve(__dirname, "assets", "es6")
    }
}